﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="CreatePrismModule"
        xmlns="http://schemas.microsoft.com/pag/gax-core"
        xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="Common/CommonTypeAliases.xml"
				xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Creates a new 4ward Prism Module</Caption>
  <Description>Creates a new 4ward Prism Module</Description>
  <HostData>
    <CommandBar Menu="PRISMSolution"/>
    <CommandBar Menu="PRISMFolder"/>
  </HostData>
  <Arguments>
    
    <Argument Name="ModuleName">
      <ValueProvider Type="ItemNameProvider"/>
    </Argument>
    <Argument Name="RootNamespace">
      <ValueProvider Type="GlobalValueProvider" Key="RootNamespace" />
    </Argument>
    <Argument Name="ModuleNamespace">
      <ValueProvider Type="Evaluator" Expression="$(RootNamespace).$(ModuleName)">
        <MonitorArgument Name="ModuleName"/>
      </ValueProvider>
    </Argument>

    <!--Module project instance-->
    <Argument Name="ModuleProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectConverter" />
      <ValueProvider Type="FirstSelectedProjectValueProvider" />
    </Argument>

    <!--Infrastructure project instance from GUID-->
    <Argument Name="InfrastructureProjectGuid" Type="System.String">
      <ValueProvider Type="GlobalValueProvider" Key="InfrastructureProjectGuid" />
    </Argument>
    <Argument Name="InfrastructureProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <ValueProvider Type="GetProjectFromGuidValueProvider" FromArgument="InfrastructureProjectGuid">
        <MonitorArgument Name="InfrastructureProjectGuid"/>
      </ValueProvider>
    </Argument>
    
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0" Help="ms-help://MS.VSCC.v90/MS.VSIPCC.v90/ms.practices.scsf.2008apr/SCSF/html/03-01-020-How_to_Create_a_Business_Module.htm">
      <Pages>
        <Page Type="PrismFactory.SoftwareFactory.CustomWizardPages.CreateModule.CreateModulePage, PrismGuidancePackage" Height="300" Width="400">
          <Title>Create Module</Title>
          <LinkTitle>Module properties</LinkTitle>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions>
    <Action Name="UnfoldModuleProjects" Type="PrismFactory.SoftwareFactory.Actions.UnfoldModuleProjectsAction, PrismGuidancePackage"
      ModuleProjectTemplate="Projects\Module.WPF\Module.vstemplate"
      ModuleTestProjectTemplate ="Projects\Module.Tests.WPF\Module.Tests.vstemplate">
      <Input Name="ModuleProject" RecipeArgument="ModuleProject"/>
      <Input Name="RootNamespace" RecipeArgument="RootNamespace"/>
      <Input Name="InfrastructureProject" RecipeArgument="InfrastructureProject"/>
      <Output Name="ModuleProject"/>
      <Output Name="TestProject"/>
    </Action>
  </Actions>
</Recipe>
